//
//  DZReportController.m
//  dzyc
//
//  Created by 蓝鳍互娱 on 2024/6/11.
//

#import "DZReportController.h"
#import "DZMainController.h"
#import "DZReportAlertView.h"
@interface DZReportController ()
@property (weak, nonatomic) IBOutlet UIButton *changeReportBtn;

@end

@implementation DZReportController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    self.navigationController.navigationBar.hidden = YES;
    
    self.changeReportBtn.selected = [DZ_GETObject_UserDef(NSUserDefaults_OpenLocal) isEqualToString:@"1"];
}
- (IBAction)changeReport:(UIButton *)sender {
    DZWeakSelf
    if(self.changeReportBtn.isSelected){
        self.changeReportBtn.selected = false;
        DZ_SETObject_UserDef(NSUserDefaults_OpenLocal, @"0");
    }else{
        [DZReportAlertView showReportAlertView:^{
            DZ_SETObject_UserDef(NSUserDefaults_OpenLocal, @"1");
            weakSelf.changeReportBtn.selected = true;
        }];
    }
}
- (IBAction)navBack:(UIButton *)sender {
    [self.navigationController popViewControllerAnimated:YES];
}
- (IBAction)navSet:(UIButton *)sender {
    DZMainController * mainCtrl = [[DZMainController alloc] init];
    [self.navigationController pushViewController:mainCtrl animated:YES];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
